-
-
Notifications
You must be signed in to change notification settings - Fork 389
Fix suggestAddTypeAnnotation regex #760
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There are plans to make GHC produce structured errors: https://gitlab.haskell.org/ghc/ghc/-/issues/18516 |
How do we know that your fix works? A new test case in https://github.com/haskell/haskell-language-server/blob/master/ghcide/test/exe/Main.hs would be great. |
d853733
to
f5039f5
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Awesome, thanks!
Co-authored-by: Javier Neira <atreyu.bbb@gmail.com> Co-authored-by: Pepe Iborra <pepeiborra@gmail.com> Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
I had a code with some warnings
The suggestion is
and it results in a wrong fix:
From the warning
it seems the
lit
is parsed as3’ • In the expression: 3 In an equation for ‘x
instead of3
since it is longer and still valid:In the expression
after it.Btw the approach here seems rather hacky. Are there any plans for ghc to give better support for fix sugestions?
tested with ghc-8.8.4